package com.maserb.monitor.service.jwQuestion;

import com.maserb.monitor.entity.jwQuestion.JwQuestionUserEntity;
import com.maserb.monitor.repository.JwQuestion.JwQuestionUserRepository;
import com.maserb.monitor.service.base.JpaSpecificationService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;


public interface JwQuestionUserService extends JpaSpecificationService<JwQuestionUserRepository, JwQuestionUserRepository, JwQuestionUserEntity, String> {
    List<JwQuestionUserEntity> findByUserName(String userName);

    List<JwQuestionUserEntity> findByQuestionIdAndUserName(String questionId,String userName);

    Page<JwQuestionUserEntity> findAllByUserName(Pageable var1,String userName);

    Page<JwQuestionUserEntity> findAll(Pageable var1,String name,String schoolId);

    List<JwQuestionUserEntity> findAllByQuestionIdOrderByCreateTimeAsc(String questionId);

    List<JwQuestionUserEntity> findAllByQuestionIdOrderByCreateTimeAsc(Pageable pageable,String questionId);

    //随机几条数据


    Long selectCountByQuestionId(String questionId);
}